// 合作伙伴 -- 客户&供货商
import fetch from '@/config/fetch'

// 查询客户列表
export const getCustomerList = data => fetch('/customer/customer_list/', data);
// 查看客户详情
export const infoCustomer = (id, data) => fetch("/customer/"+ id +"/customer_single/", data);
// 新增客户
export const addCustomer = data => fetch('/customer/customer_add/', data, 'POST');
// 编辑客户
export const editCustomer = (id, data) => fetch("/customer/"+ id +"/customer_update/", data, 'PUT');
// 删除客户
export const removeCustomer = (id, data) => fetch("/customer/"+ id +"/customer_del/", data, 'DELETE');
// 批量删除客户
export const removeBatchCustomer = data => fetch('/customer/customer_batch_del/', data, 'POST');
// 客户分类
export const getCustomerCates = data => fetch('/customer_category/category_list/', data);
// 新增客户分类
export const addCustomerCate = data => fetch('/customer_category/category_add/', data, 'POST');
// 编辑客户分类
export const editCustomerCate = (id, data) => fetch("/customer_category/"+ id +"/category_update/", data, 'PUT');
// 删除客户分类
export const removeCustomerCate = (id, data) => fetch("/customer_category/"+ id +"/category_del/", data, 'DELETE');

// 查询供货商列表
export const getSupplierList = data => fetch('/supplier/supplier_list/', data);
// 查看供货商详情
export const infoSupplier = (id, data) => fetch("/supplier/"+ id +"/supplier_single/", data);
// 新增供货商
export const addSupplier = data => fetch('/supplier/supplier_add/', data, 'POST');
// 编辑供货商
export const editSupplier = (id, data) => fetch("/supplier/"+ id +"/supplier_update/", data, 'PUT');
// 删除供货商
export const removeSupplier = (id, data) => fetch("/supplier/"+ id +"/supplier_del/", data, 'DELETE');
// 批量删除供货商
export const removeBatchSupplier = data => fetch('/supplier/supplier_batch_del/', data, 'POST');
// 供货商分类
export const getSupplierCates = data => fetch('/supplier_category/category_list/', data);
// 新增供货商分类
export const addSupplierCate = data => fetch('/supplier_category/category_add/', data, 'POST');
// 编辑供货商分类
export const editSupplierCate = (id, data) => fetch("/supplier_category/"+ id +"/category_update/", data, 'PUT');
// 删除供货商分类
export const removeSupplierCate = (id, data) => fetch("/supplier_category/"+ id +"/category_del/", data, 'DELETE');

// 收款单列表
export const getReceivePaymentList = data => fetch('/receipt_payment/orders_list/', data);
// 新增收款单
export const addReceivePayment = data => fetch('/receipt_payment/receipt_add/', data, 'POST');
// 编辑收款单
export const editReceivePayment = (id, data) => fetch("/receipt_payment/"+ id +"/receipt_update/", data, 'PUT');
// 收款单详情
export const getReceivePaymentInfo = (id, data) => fetch("/receipt_payment/"+ id +"/orders_single/", data);
// 删除收款单
export const removeReceivePayment = (id, data) => fetch("/receipt_payment/"+ id +"/orders_del/", data, 'DELETE');

// 付款单列表
export const getPaymentList = data => fetch('/bills_payment/orders_list/', data);
// 新增付款单
export const addPayment = data => fetch('/bills_payment/bills_add/', data, 'POST');
// 编辑付款单
export const editPayment = (id, data) => fetch("/bills_payment/"+ id +"/bills_update/", data, 'PUT');
// 付款单详情
export const getPaymentInfo = (id, data) => fetch("/bills_payment/"+ id +"/orders_single/", data);
// 删除付款单
export const removePayment = (id, data) => fetch("/bills_payment/"+ id +"/orders_del/", data, 'DELETE');